package com.example.mydemo.companyType.controller;

import com.example.mydemo.companyType.entity.CompanyType;
import com.example.mydemo.companyType.service.ICompanyTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/company_type")
public class CompanTypeController {

    @Autowired
    private ICompanyTypeService companyTypeService;

    @GetMapping("/select")
    public List<CompanyType> select() {
        return companyTypeService.select();
    }

    @GetMapping("/id_name")
    public Map<Integer, String> idName() {
        return companyTypeService.idName();
    }

}
